home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Description of the file format of IEditor's data files
- **
- ** This is © Copyright 1994-95 Simone Tellini
- **
- ** This file can NOT be distributed in any way, without my
- ** EXPLICIT permission.
- **
- */
-
-
- STR identifies a String: in IE's files, string are stored in this way:
-
- UBYTE String Length
- CHAR String (_without_ the final 0)
- CHAR PadToWord (ONLY present if StringLen+1 is odd)
-
- So, an empty string looks like:
-
- $00 $00
- ^^
- ^^ `---> Pad ( strlen + 1 = 0 + 1 = 1, ODD )
- `-------> String length = NULL
-
-
-
- This is the file format:
- ========================
-
- *** File header
-
- LONG Header ; 'IEDf'
- LONG Version ; currently 3, be SURE to check it *before* loading
- ; the rest of the file
- LONG InterfaceID ; 'INTF'
-
- BYTE SrcFlags ; currently only bit 6 is defined: if set, the code
- ; should be font adaptive.
-
- BYTE GenerateScr ; if <> 0 you should generate the code for the
- ; Screen too.
-
- *** Screen data
-
- WORD Width
- WORD Height
- WORD Depth
- LONG DisplayID
- WORD Overscan ; value to pass to SA_Overscan
- WORD AutoScroll ; " " " " SA_Autoscroll
- WORD Font YSize
- BYTE Font Flags
- BYTE Font Style
- WORD ScrAttrs ; described below
- WORD Left
- WORD Top
- WORD ScreenType ; CUSTOM or PUBLIC
- WORDS DriPens ; There are 12 words
- STR FontName
- STR Title
- STR PubName
-
- ; Here comes the Palette: colors are stored in RGB format, 8 bit per gun.
- ; Their number depends on Depth, of course.
-
- *** Window Data
-
- WORD Windows Number ; it could be equal to 0, e.g. if the file
- ; contains only ARexx commands.
-
- ; Then, for each window
-
- WORD TopEdge
- WORD LeftEdge
- WORD Width
- WORD Height
- WORD MinWidth
- WORD MaxWidth
- WORD MinHeight
- WORD MaxHeight
- WORD InnerWidth
- WORD InnerHeight
- WORD ZoomLeft ; array to pass to WA_Zoom
- WORD ZoomTop
- WORD ZoomWidth
- WORD ZoomHeight
- WORD MouseQueue
- WORD RptQueue
- LONG Window Flags
- LONG IDCMP
- LONG WndTags ; Packet of tags, see below
- STR Title
- STR ScreenTitle
- STR Label ; if not present, you MUST provide a valid label.
-
- WORD Number of Gadgets
- [...Gadgets Data...]
- WORD Number of Menus
- [...Menus Data...]
- WORD Number of Boolean Gadgets
- [...Booleans Data...]
- WORD Number of Bevel Boxes
- [...]
- WORD Number of Images
- [...]
- WORD ControlWord ; if = 0 then there aren't other informations
- ; about this window else...
- WORD Number of IntuiTexts
- [...]
- WORD ControlWord ; this is here just for upward compatibilty ;)
-
- WORD Number of Image structure (not the Images drawn on windows)
- [...]
- WORD ThereIsARexx? ; if <>0, read...
- [...] ; ...ARexx Data
-
- Well, let's try to explain what you've just read:
-
- These is the structure: (less or more... ;-)
-
- |
- +-> Number of Windows
- |
- > +----> Window Data
- | | |
- | | +--> Number of Gadgets in this window
- | | | |
- | | | `-> Gadgets Data
- | | |
- | | +--> Number of Menus
- | | | |
- | | | `-> Menus data
- | ....
- | ....
- | |
- `-'
- |
- |
-
- Anyway, you have understood, don't you? ;-)
-
-
-
- *** Gadgets Data
-
- WORD LeftEdge
- WORD TopEdge
- WORD Width
- WORD Height
- LONG Flags
- WORD Kind
- LONG GadgetTags ; as for WndTags, these are bit-mapped
- LONG Data1 ; the content of these fields depends on
- LONG Data2 ; the gadget kind, see the related file.
- ...
- LONG Data7
- WORD Font YSize
- BYTE Font Flags
- BYTE Font Style
- WORD Number of Items ; for MXs, CYCLEs and LISTVIEWs
- STRS Item ; if Number of Items is = 0 these strings aren't
- ; present, of course.
- STR String ; ONLY for STRING and TEXT gadgets
- STR GadgetText
- STR Label
- STR FontName
-
-
- *** Menus Data
-
- BYTE MenuFlags ; bit-mapped
- BYTE Pad
- WORD Number of Items
- STR Text
- STR Label
-
- ; then, if there are items...
-
- BYTE MenuFlags ; bit-mapped
- BYTE Pad
- STR Text
- STR CommKey
- STR Label
- WORD Image ; this is the *number* of the image to use
- ; -1 means NO IMAGE
- ; if the image is set, this will be a IM_ITEM
- LONG MutualExclude
- WORD Number of SubItems
-
- ; ...if there are SubItems...
-
- BYTE MenuFlags
- BYTE Pad
- STR Text
- STR CommKey
- STR Label
- WORD Image
- LONG MutualExclude
-
-
- *** Boolen Gadgets Data
-
- WORD Left ; Gadget structure (gg_...)
- WORD Top
- WORD Width
- WORD Height
- WORD Flags
- WORD Activation
- WORD GadgetType ; always = GTYP_BOOLGADGET
- WORD RenderImage ; number of the image
- WORD SelectRenderImage
- BYTE FrontPen ; IntuiText structure
- BYTE BackPen
- BYTE DrawMode
- BYTE Pad
- WORD TextLeft
- WORD TextTop
- WORD Font YSize
- BYTE Font Flags
- BYTE Font Style
- BYTE UseText ; if = 0, this gadget does *NOT* have a text
- BYTE TitleLength ; this is a STR, but it considers the UseText
- CHARS Title ; byte when aligning to a word boundary.
- BYTE Pad ; present if TitleLength is ODD
- STR Label
- STR null ; for backward compatibility
- STR null
-
-
- *** Bevel Boxes Data
-
- WORD Left
- WORD Top
- WORD Width
- WORD Height
- LONG Recessed ; 0 if not
- LONG FrameType
-
-
- *** Images Data
-
- WORD Left
- WORD Top
- WORD Image Number ; number of the image to use
-
-
- *** IntuiTexts Data
-
- BYTE FrontPen
- BYTE BackPen
- BYTE DrawMode
- BYTE TextFlags ; currently only bit 0 is defined: if set,
- ; this IntuiText uses the ScreenFont
- WORD Left
- WORD Top
- STR Text
- WORD ControlWord ; if 0, there aren't other data for this text
- STR FontName
- WORD Font YSize
- BYTE Font Flags
- BYTE Font Style
-
-
- *** Image Structures Data
-
- WORD Width
- WORD Height
- WORD Depth
- LONG Size of Data
- BYTES Data
- BYTE PlanePick
- BYTE PlaneOnOff
- STR Label
-
-
- *** ARexx Data
-
- STR PortName
- STR Extension
- WORD Number of Commands
-
- *** ARexx Command
-
- STR Label
- STR Name
- STR Template
-
-
-
- *** Bits
-
- ,---------> Bit Number
- | ,--> Its meaning (when set)
- V V
-
- Bit scheme of ScrAttrs:
- -----------------------
-
- 0 - Use WA_Left
- 1 - Use WA_Top
- 2 - SA_ShowTitle = TRUE
- 3 - SA_Behind = TRUE
- 4 - SA_Quiet = TRUE
- 5 - Use SA_Overscan
- 6 - SA_FullPalette = TRUE
- 7 - SA_ErrorCode = TRUE
- 8 - SA_Draggable = TRUE
- 9 - SA_Exclusive = TRUE
- 10 - SA_SharePens = TRUE
- 11 - SA_Interleaved = TRUE
- 12 - SA_LikeWorkbench = TRUE
- 13 - SA_MinimizeISG = TRUE
-
-
-
- Bit scheme of WndTags:
- ----------------------
-
- 1 - Use WA_ScreenTitle
- 2 - Set WA_MouseQueue
- 3 - Set WA_RptQueue
- 4 - WA_AutoAdjust = TRUE
- 5 - WA_FallBack = TRUE
- 6 - Use WA_Zoom
- 7 - WA_TabletMessage = TRUE
- 8 - WA_MenuHelp = TRUE
- 9 - WA_NotifyDepth = TRUE
-
-
- Bit scheme of MenuFlags:
- ------------------------
-
- 0 - Disabled
- 1 - BarLabel
- 2 - CheckIt
- 3 - Checked
- 4 - MenuToggle
-